<template>
  <div class="commont">
    <div class="commont_head">
      <h3 class="left">全部评论</h3>
    </div>
    <div class="commont_des" v-for="item in resdata" :key="item.commitid">
      <img :src="item.userimg" alt="" class="userimg" />
      <div class="commont_right">
        <a href="" class="username">{{item.username}}</a>
        <p class="usercommont">{{item.usercommit}}</p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props:["liveId"],
  data(){
    return{
      resdata:[]
    }
  },
  mounted(){
    // console.log(this.liveId);
  this.axios.get("/Daka/commit",{params:{liveID:this.liveId}}).then((res)=>{
    // console.log(res.data);
    this.resdata=res.data;
  })
}
};

</script>
<style lang="scss" scoped>
a {
  text-decoration: none;
}
.commont_head {
  width: 900px;
  height: 65px;
  border-top: 2px solid rgb(231, 231, 231);
  border-bottom: 2px solid rgb(231, 231, 231);
  text-align: center;
  line-height: 65px;
  .left {
    text-align: left;
    // margin-left: 0;
    font-size: 18px;
    color: #ddb256;
  }
}
.commont_des {
  width: 900px;
  height: 100px;
  margin-top:30px;
  display: flex;
  justify-content: flex-start;
  border-bottom: 2px solid rgb(231, 231, 231);
  margin-right: 20px;
  .userimg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(250, 250, 155);
  }
  .commont_right {
    width: 900px;
    margin-left: 20px;

    .username {
      // margin: 10px 0 20px;
      font-size: 16px;
      color: #212b34;
    }
    .usercommont {
      font-size: 14px;
      color: #212b34;
      margin-top: 10px;
    }
  }
}
</style>